<body>
<div id="container">
    <header>
        <div id="login_div">
        <button onclick="location.href='<?php echo base_url()."main/login"; ?>'">Odhlásiť sa</button>
        </div>
    </header>
    <div id="main_content">
        <nav>
        	<a href="<?php echo base_url()."admin"; ?>">úvod</a>
            <a href="<?php echo base_url()."rozvrh" ?>">rozvrh</a>
			<a href="<?php echo base_url()."admin/addUdalost" ?>">udalosť</a>
			<a href="<?php echo base_url()."admin/addTermin" ?>">termín</a>
			<a href="<?php echo base_url()."admin/zmenUdalost" ?>">zmeň udalosť</a>
        </nav>
        <div id="middle_content">
	<fieldset>
	<legend>Zmena</legend>

  <?php
    echo form_open('admin/udalost_validation');
    
    echo validation_errors();
    
    echo "<p><label>Názov: </label>";
    echo form_input('nazov', $this->input->post('nazov'));
    echo "</p>";
    
    echo "<p><label>Miestnosť: </label>";
    echo form_input('miestnost', $this->input->post('miestnost'));
    echo "</p>";
    
    echo "<p><label>Zameranie: </label>";
    echo form_input('zameranie', $this->input->post('zameranie'));
    echo "</p>";
    
    echo "<p><label>Abstrakt: </label>";
    echo form_input('abstrakt', $this->input->post('abstrakt'));
    echo "</p>";
    
    echo "<p><label>Deň: </label>";
    echo form_input('den', $this->input->post('den'));
    echo "</p>";
    
    $options = array(
                   '7'    => '7:00',
                   '8'    => '8:00',
                   '9'   => '9:00',
                   '10' => '10:00',
                   '11'  => '11:00',
                   '12'    => '12:00',
                   '13'   => '13:00',
                   '14' => '14:00',
                   '15'  => '15:00',
                   '16'    => '16:00',
                   '17'   => '17:00',
                   '18' => '18:00',
                   '19' => '19:00',
                   '20' => '20:00'
                 );
                     
    echo "<p><label>Čas od: </label>";
    echo form_dropdown('casOd', $options, $this->input->post('casOd'));
    
    echo "<label class=\"short\">do: </label>";
    echo form_dropdown('casDo', $options, $this->input->post('casDo'));
    echo "</p>";
    
    echo "<p><label>Trvanie: </label>";
    echo form_input('trvanie', $this->input->post('trvanie'));
    echo "</p>";
    
    echo "<p><label>Max ľudí: </label>";
    echo form_input('maxLud', $this->input->post('maxLud'));
    echo "</p>";
    
    $options2 = array(
                   '0'    => 'nie',
                   '1'    => 'áno',
                 );
    
    echo "<p><label>Fixný čas: </label>";
    echo form_dropdown('maxLud', $options2, $this->input->post('maxLud'));
    echo "</p>";
    
    echo "<p><label>Poznámka: </label>";
    echo form_input('poznamka', $this->input->post('poznamka'));
    echo "</p>";
    
    echo "<p><label></label>";
    echo form_submit('udalost_submit', 'Vytvor');
    echo "</p>";
    
    echo form_close();
	echo "<p><label></label>";
  ?><a href='<?php echo base_url()."main/members" ?>'><button>späť</button></a>
  </p>
</fieldset>
</div>
</div>